---
sidebar_position: 4
tags: [modifiers, debugging]
---

# ⏭️ skip

## Skipping a test file

You can skip test files when necessary:

```ts
import { skip } from 'poku';

skip();
```

You can also pass an optional message to `skip` method:

```ts
import { skip } from 'poku';

skip('Skipping for some reason');
```

:::important
This will skip the entire file and it's recommended to be used at the top of the test file.
:::

:::note
Skipped tests are considered successful tests and don't affect the file test count.
:::

---

### Examples

Imagine that a specific test doesn't work on a specific _OS_:

```ts
import { test, skip } from 'poku';
// highlight-start
import { platform } from 'node:process';

const isWindows = platform === 'win32';

// highlight-end
if (isWindows) skip('Skipping due to incompatibility with Windows');

// Runs tests normally on other operating systems
// highlight-start
test(() => {
  // ...
});
// highlight-end
```

---

## `describe`, `it` and `test` modifier

To assist in the debugging process, you can modify your tests by temporarily skipping specific tests:

```ts
import { describe, it } from 'poku';

describe(() => {
  it('Running this', () => {
    // I'll be executed
  });

  it.skip('Skipping for some reason', () => {
    // I won't be executed
  });
});
```

Supports:

- `describe.skip`
- `it.skip`
- `test.skip`

:::note
Skipped tests are considered successful tests and don't affect the file test count.
:::
